package com.z6school.manage.controller;


import com.z6school.manage.common.pojo.JsonResult;
import com.z6school.manage.common.pojo.PageObject;
import com.z6school.manage.mapper.LogsMapper;
import com.z6school.manage.po.Log;
import com.z6school.manage.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/log/")
public class LogController {

    @Autowired
    private LogService logService;

    @RequestMapping("doFindPageObjects")
    public JsonResult doFindObjects(String username ,Integer pageCurrent){
        PageObject<Log> objects = logService.findObjects(username, pageCurrent);
        return new JsonResult(objects);
    }
    @RequestMapping("doDeleteObjects")
    public  JsonResult doDeleteObjects(Integer ...ids){
        logService.deleteObjects(ids);
        return new JsonResult("删除成功");
    }
}
